home *** CD-ROM | disk | FTP | other *** search
- *************************************************************************
- * *
- * AMICOM'S SCULPT TO SOURCE CONVERTER CONS V1.29 (1989-11-29) *
- * *
- *************************************************************************
-
-
- ConS V1.29 Description
- ---------------------------------
-
- Cons converts Sculpt objects (.scene files) to assembler source code.
- It also allows you to produce C or other languages.
- It deals primarily with edges, a simple face converter is also available.
- Two output formats for edges are available: standard point-to-point
- and AMICOM format#2, designed for ultra fast line draw.
-
-
-
- ConS V1.29 Instructions
- ---------------------------------
-
- AMICOM'S Sculpt Converter V1.29 (1989-11-29)
- Usage: file [-DIV n] [-CFORMAT=CF s] [-FFORMAT=FF s] [-FACE]
- [-EFCR] [-EFAMICOM=EFA] [-ITEMS n] [-ECMULT=ECM n]
-
- Input and output file
- -----------------------
- To convert a file, specify the name of the source file only.
- The converted data is sent to the standard output (e.g to the CLI
- window, if not specified). Use CLI output redirection to get a file.
-
- Example: You have a Sculpt (TM) data file named 'test.scene' and want to
- convert it into a file called 'test.asm'.
- Then you should enter
-
- ConS >test.asm test.scene [options]
- ^ ^
- redirection argument(s)
-
-
- ConS options
- --------------
- The converter has been designed in a way to give the user a maximum of
- flexibility concerning the output format. Although it has been primarily
- designed for assembler users, it allows you to produce data files for
- almost all kinds of programming languages.
-
- ConS uses options in UNIX syntax. An option is preceeded by a '-' (minus)
- mark. You need not bother for upper/lower case.
-
-
- ----------------------------------------------------------------------
- Option FACE
- Use this option to get a listing of faces, too.
- Each face is described by a list of all its edge points followed by a
- termination code. The default termination code is 'dc.w -1'.
-
-
- ----------------------------------------------------------------------
- Option DIV number
- This option lets you determinate the numerical range for the coordinates
- list. It also sets the format of coordinates to words.
- (instead of longwords)
- Without this option, the coordinate values are taken from the source
- data 'as is'. They are longwords and may range from -100,000 to +100,000
- or even more.
- If you use this option, the source values are divided by the value you
- give. The result must be a word (e.g range from -32768 to +32767).
- If it exceeds word boundaries, an error is reported.
-
- Example: You generated a Sphere by selecting 'ADD SPHERE' and want to
- convert it to have a radius of 1000. The radius of the Sculpt
- sphere usually is 75,000. Therefore you should enter
-
- ConS sphere.scene -div 75
-
- ----------------------------------------------------------------------
- Option CFORMAT = CF string
- ! This is an option for the advanced user. You need to have some knowledge
- ! about C-syntax and namely format strings to be able to make use of it.
- This option allows you to set the format string for the coordinates
- readout. The default string used is - depending upon whether or not you
- used option DIV -
-
- " dc.l $%08lx,$%08lx,$%08lx\n" without DIV
- " dc.w %6d,%6d,%6d\n" with DIV
-
- To be able to use this option correctly and get a maximum of utility out
- of it you should keep in mind the following:
-
- - place the string within quotation marks, to allow for space or tab
- - in case you want to have a special character inside it, here is a
- list of supported translations
-
- \n means newline = $0a = CR
- \t means tab = $09
- \0 means endString = $00 = CTRL-@
- \s means dollar = '$' ( non-standard!)
-
- Warning: Users of ARP-Shell or old CLI should ALWAYS use \s instead of $.
- The ARP-Shell gets confused by the misuse of $
- Also, you MUST use the real quotation mark (") around
- all texts that contain a semicolon (;). Otherwise, the Shell
- assumes this character terminates the input string.
-
-
- EXAMPLE: Let's say you want to use Sculpt data in a BASIC program.
- Therefore, you may wish to provide 'DATA' statements and
- a convenient number format.
- In this case, you might set the coords formatting string to
- something like in
-
- Cons object2.scene -CF 'DATA &H%08lx,&H%08lx,&H%08lx \n'
-
- This gives you the preamble &H for hexadecimal in BASIC
- instead of $ in Assembler.
-
-
- ----------------------------------------------------------------------
- Option FFORMAT = FF string
- ! This is an option for the advanced user.
- ! Also refer to option CFORMAT for general introduction.
- It alows you to specify up to 4 format strings for the edge and face
- readouts. The default strings are:
-
-
- " dc.w\t"
- "%ld,"
- "\t;\n"
- "\t;\n dc.w -1\n",0
-
- The 1st one is used for edges and faces everytime a new line containing
- a list of numbers starts.
-
- The 2nd one is used for edges and faces as number format descriptor.
-
- The 3rd one is used for edges only, to terminate a line.
-
- The 4th one is used for faces only, to provide a 'end of face' control
- character and start a new line.
-
- HOW TO ENTER MULTIPLE STRINGS:
- You start a second string by terminating the first one with a CTRL-@.
- Use \0 to get an end-string character.
- You can change all strings, or only the ones you want. Simply give
- a nul string for the string you want to remain unchanged.
-
-
- EXAMPLE: Let's say you want to change the dc.w statement and the colon
- at the end of each line in the edges readout.
- This will do it for you:
-
- ConS file -FF 'DATA \0\0 :REM remark\n'
- ^ ^ ^
- | | start of 3rd string
- | skip 2nd string
- 1st string
-
- Please note that no specification for the 4th string has been made
- at all. You need not enter a nul-string for following string entries,
- but only for those you want to skip.
-
-
- EXAMPLE 2: To change only the face-termination string write:
-
- ConS file -FACE -FF '\0\0\0\n---END---\n'
-
- ----------------------------------------------------------------------
- Option EFAMICOM = EFA
-
- This option selects a special output format for the edges (lines).
- The default system is: define a line by its start- and ending point nr.
- The AMICOM system is: Hold a fix starting point (begin with number 0),
- then interpret all incomming point numbers as ending points of lines
- to the held starting point. Continue until a control code comes in:
- Negative numbers are control codes. -1 means 'increment starting point
- number', -2 means 'increment starting point number by 2', and so on.
- All point numbers and control codes are multiplied by a factor adjustable
- usig option ECMULT. The default multiplication factor is 8.
- A special end code is represented by the hex value $80fe.
-
- ----------------------------------------------------------------------
- Option ECMULT=ECM number
-
- This option is used for the AMICOM edges format.
- It sets the multiplication factor for point numbers and skip-points
- control codes. The default value is 8.
- This option can also be used for the normal format. Here, the
- default value is 1.
-
- ----------------------------------------------------------------------
- Option EFCR
-
- This option slightly changes the the AMICOM format:
- With this option set, a new line is forced after every control code.
-
- ----------------------------------------------------------------------
- Option ITEMS number
-
- !! ATTENTION: This option is marked 'ITEM' in the internal usage note. !!
- Lets you choose the number of values displayed per line.
- Gets applied for edges and faces.
-
- ----------------------------------------------------------------------
-
-
-
- ConS V1.29 Error messages
- -------------------------------------
- *** Input line too long!
- -
-
- *** Error in numerical.
- Invalid numerical parameter to an option.
-
- *** Missing string parameter
- An option you used needs a string parameter.
-
- *** Got unexpected argument. Specify only input file name.
- Check for '-' before options.
-
- *** Missing input file name.
- -
-
- *** Unrecognized option '%s'
- Options are: DIV,CF,FF,FACE,EFCR,EFA,ITEM,ECM
- !! Note that option ITEMS is marked as just 'ITEM' - sorry, an error !!
-
- *** Invalid input file <name>!
- The file is not a sculpt file.
-
- *** Input file too short or corrupt.
- -
-
- *** Can't open <file> - DOS error <nr>
- -
-
- *** Can't get memory (<nr> bytes) for source file!
-
- *** No VERT (coords) chunk found - Operation aborted.
- Something wrong with the sculpt file.
-
- *** No EDGE (lines) chunk found - Operation aborted.
- -
-
- *** No FACE chunk found - Operation aborted.
- -
-
- *** User break.
- Can be forced by ^C, ^D
-
- *** Value in coords list exceeds word bounds! Operation aborted.
- Option DIV must be given a larger parameter.
-
-
-
-
- APPENDIX: The formatstring syntax.
- ---------------------------------------
- Format strings are used to display variable data elements within
- a fix context. The format string describes what data type you want
- to diplay and allows you to specify exactly how to display it.
- A format sequence may be used anywhere within a string and is
- replaced by the text it describes.
-
- In the C language, formatted text output is a vital element and is
- automatically performed by the printf routine.
-
- In Assembler, you can use format strings with all data types except
- floating point numbers using the exec.library routine RawDoFmt.
-
- A format string looks like this
- % [-] [0] [number[.number]] [s|x|lx|d|ld]
- (1) (2) (3) (4) (5)
-
- where (1) is the control character to introduce a format sequence
- (2) a preceding - means 'print left-bounded'
- (3) a preceeding 0 means 'display trailing zeros' (numbers only)
- (4) if you don't specify a number, then whatever you display
- will appear in its true length
- If you specify one number N (may be one ore more digits)
- then the text will use AT LEAST N chars, padded if necessary
- with SPACEs.
- If you specify a second number after the point like N.M
- then the text will use at least N and to the most M chars.
- (5) the actual data type descriptor
- s = string
- x = hex (word) lx = hex (longword)
- d = dec (word) ld = dec (long)
- f = floating point (not supported)
-
-
-
-